﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SES.CMS.BL;
using System.Web.UI.HtmlControls;

namespace SES.CMS
{
    public partial class Albums : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
             string host = Request.Url.Host;
              
            if (!IsPostBack)
            {
                rptAlbumDataSoucre();
                HtmlMeta meta = new HtmlMeta();
                meta.Name = "description";
                if (host.ToLower().Equals("localhost") || host.ToLower().Equals("cayxanhdangviet.com"))
                {
                    Page.Title = "Albums | " + Ultility.WebTitle(true);
                    meta.Content = Page.Title + " - " + Ultility.WebTitle(true);
                }
                else
                {
                    Page.Title = "Albums | " + Ultility.WebTitle(false);
                    meta.Content = Page.Title + " - " + Ultility.WebTitle(false);
                }
                Page.Header.Controls.Add(meta);
            }
        }

        protected void rptAlbumDataSoucre()
        {
            rptAlbum.DataSource = new cmsAlbumBL().SelectAll();
            rptAlbum.DataBind();

        }
        protected string FriendlyUrl(string s)
        {
            return Ultility.Change_AV(s);
        }
    }
}